<template>
  <div>
    <div>
      <h4>vuex测试计算加减</h4>
      <p>-------------------</p>
      <my-add></my-add>
      <p>--------------------</p>
      <my-sub></my-sub>
    </div>
    <p>--------------------------------------------------------------</p>
    <div>
      <h4>测试mixin</h4>
      <p>--------------------</p>
      <a-mixin></a-mixin>
      <p>--------------------</p>
      <b-mixin></b-mixin>
    </div>
    <p>--------------------------------------------------------------</p>
    <div>
      <a-promise></a-promise>
    </div>

    <a-admin></a-admin>

  </div>
</template>

<script>
import myAdd from "@/components/add";
import mySub from "@/components/sub";

import aMixin from "@/components/a-mixin";
import bMixin from "@/components/b-mixin";

import aPromise from "../promise/a-promise";

//测试登录
// import aAdmin from "@/pages/admin.vue";
export default {
  components: {
    myAdd,
    mySub,
    bMixin,
    aMixin,
    aPromise,

    //登录
    // aAdmin
  },
  mounted() {
    console.log(this.$store.state.count);
    
// // 发ajax请求，用以获取数据，此处地址意思是查询 github中 vue 星数最高的项目
//             // let url = 'https://api.github.com/search/repositories?q=vue&sort=stars'
//             let url = 'http://api/blog/list'
//             this.$http.get(url).then(
//                 response => {
//                     const result = response.data.items[0];
//                     console.log(result)
//                     this.repositoryUrl = result.html_url;
//                     this.repositoryName = result.name;
//                 },

//                 // response => {
//                 //     alert('请求失败');
//                 // },
//             );
    
  },
};
</script>

<style>
</style>
